package cn.stylefeng.guns.modular.hx.storage.mapper;

import cn.stylefeng.guns.modular.hx.storage.entity.HxStorageMoveRecord;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxStorageMoveRecordParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxStorageMoveRecordResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 移库记录表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2023-09-09
 */
public interface HxStorageMoveRecordMapper extends BaseMapper<HxStorageMoveRecord> {

    /**
     * 获取列表
     *
     * @author 
     * @Date 2023-09-09
     */
    List<HxStorageMoveRecordResult> customList(@Param("paramCondition") HxStorageMoveRecordParam paramCondition);

    /**
     * 获取map列表
     *
     * @author 
     * @Date 2023-09-09
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HxStorageMoveRecordParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 
     * @Date 2023-09-09
     */
    Page<HxStorageMoveRecordResult> customPageList(@Param("page") Page page, @Param("paramCondition") HxStorageMoveRecordParam paramCondition, @Param("operateId") Long operateId, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author 
     * @Date 2023-09-09
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HxStorageMoveRecordParam paramCondition);

    @Delete("delete from hx_storage_move_record where date_format(transfer_time,\"%Y-%m-%d\") < #{format}")
    void deleteByTime(@Param("format")String format);

    List<String> findOutTask(@Param("id") Long id);

	HxStorageMoveRecordResult count(@Param("paramCondition") HxStorageMoveRecordParam paramCondition, @Param("operateId") Long operateId, @Param("condition") String condition);

	List<HxStorageMoveRecordResult> listAll(@Param("paramCondition") HxStorageMoveRecordParam paramCondition, @Param("operateId") Long operateId, @Param("condition") String condition);

    IPage selectuser(@Param("page")Page pageContext, @Param("paramCondition")HxStorageMoveRecordParam hxStorageMoveRecordParam, @Param("condition") String condition);
}
